<?php

class Controller_Manager_Home extends Controller
{
    public function __construct()
    {
        $aUser = getCurrentUser();
		if (!isset($aUser['utype']) || $aUser['utype'] != 'manager')
		{
		    Controller_Error::forbidden();
		}
    }
    
	public function index()
	{
	    $site = new Model_Site();
	    $banner = new Model_Banner();

	    $aSites = $site->find();
        $aBanners = $banner->find();

		$this->view->add(array(
		    'aSites'   => $aSites,
		    'aBanners' => $aBanners,
		));
	    return $this->view->render('manager/home.tpl');
	}
}